package com.leesche.zcsp.node.dao;

import com.alibaba.fastjson.JSON;
import com.leesche.zcsp.node.web.dao.PubDevSetParamDao;
import com.leesche.zcsp.node.web.dao.PubParamGroupDao;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryPubDevParamCondition;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryPubDevSetParamCondition;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryPubParamGroupCondition;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by Administrator on 2017-01-06.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({ "classpath:applicationContext.xml", "classpath*:applicationContext-mvc.xml" })
public class PubDevParamSetDaoImpl {
    @Autowired
    PubDevSetParamDao pubDevSetParamDao;

    @Test
    public void testSelectListsByCondition(){
        QueryPubDevSetParamCondition condition=new QueryPubDevSetParamCondition();
        condition.setParamgroupid(Long.valueOf(1));
        //ondition.set(Long.valueOf(1));
        System.out.println("testSelectListsByCondition");
        System.out.println("--------------------显示数据---------------------");

        System.out.println("数据:"+ JSON.toJSONString(pubDevSetParamDao.selectListsByCondition(condition)));

        System.out.println("--------------------显示数据结束-----------------------");

    }


    @Test
    public void testSelecByCondition(){
        QueryPubDevSetParamCondition condition=new QueryPubDevSetParamCondition();
        condition.setParamgroupid(Long.valueOf(1));
        System.out.println("testSelecByCondition");
        System.out.println("--------------------显示数据---------------------");

        System.out.println("数据:"+JSON.toJSONString(pubDevSetParamDao.selectByCondition(condition)));

        System.out.println("--------------------显示数据结束-----------------------");

    }
}
